package com.chenyun.common.exceptions;

import com.chenyun.common.vo.ResultCode;

/**
 * @author: Lonni
 * @date: 2022/5/27 0027 14:20
 */
public class BusinessException extends RuntimeException {
    private ResultCode resultCode;
    private BaseErrorCodeEnum codeEnum;

    public BusinessException() {
        super();
    }

    public BusinessException(String message) {
        super(message);
    }

    public BusinessException(Throwable cause) {
        super(cause);
    }

    public BusinessException(ResultCode resultCode) {
        this.resultCode = resultCode;
    }

    public BusinessException(BaseErrorCodeEnum codeEnum) {
        this.codeEnum = codeEnum;
    }


    public ResultCode getResultCode() {
        return resultCode;
    }

    public void setResultCode(ResultCode resultCode) {
        this.resultCode = resultCode;
    }

    public BaseErrorCodeEnum getCodeEnum() {
        return codeEnum;
    }

    public void setCodeEnum(BaseErrorCodeEnum codeEnum) {
        this.codeEnum = codeEnum;
    }
}
